---
radosgw_service_name: "radosgw"
radosgw_service_type: "object-store"
radosgw_service_description: "Object Storage Service"
radosgw_service_region: "{{ service_region }}"
radosgw_admin_user: radosgw
radosgw_admin_tenant: service

radosgw_service_port: "{{ (groups['swift_proxy'] is defined and groups['swift_proxy'] | length > 0) | ternary(7980,8080) }}"
radosgw_address: "{{ container_address }}"
radosgw_service_proto: http
radosgw_service_publicuri_proto: "{{ openstack_service_publicuri_proto | default(radosgw_service_proto) }}"
radosgw_service_adminuri_proto: "{{ openstack_service_adminuri_proto | default(radosgw_service_proto) }}"
radosgw_service_internaluri_proto: "{{ openstack_service_internaluri_proto | default(radosgw_service_proto) }}"
radosgw_service_publicuri: "{{ radosgw_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ radosgw_service_port }}"
radosgw_service_publicurl: "{{ radosgw_service_publicuri }}/swift/v1"
radosgw_service_adminuri: "{{ radosgw_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ radosgw_service_port }}"
radosgw_service_adminurl: "{{ radosgw_service_adminuri }}/swift/v1"
radosgw_service_internaluri: "{{ radosgw_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ radosgw_service_port }}"
radosgw_service_internalurl: "{{ radosgw_service_internaluri }}/swift/v1"

ceph_conf_overrides_rgw:
  "client.rgw.{{ hostvars[inventory_hostname]['ansible_hostname'] }}":
    # OpenStack integration with Keystone
    rgw_keystone_url: "{{ keystone_service_adminuri }}"
    rgw_keystone_api_version: 3
    rgw_keystone_admin_user: "{{ radosgw_admin_user }}"
    rgw_keystone_admin_password: "{{ radosgw_admin_password }}"
    rgw_keystone_admin_tenant: "{{ radosgw_admin_tenant }}"
    rgw_keystone_admin_domain: default
    rgw_keystone_accepted_roles: 'Member, _member_, admin, swiftoperator'
    rgw_s3_auth_use_keystone: true
    rgw_enable_apis: swift
